


<script type="text/javascript">
function MM_jumpMenuGo(objId,targ,restore){ //v9.0
  var selObj = null;  with (document) { 
  if (getElementById) selObj = getElementById(objId);
  if (selObj) eval(targ+".location='"+selObj.options[selObj.selectedIndex].value+"'");
  if (restore) selObj.selectedIndex=0; }
}
</script>

<div class="title_section">
Vos messages
</div>
<div class="section">
<div style="text-align:right;margin:10px;">
    <a href="<?php echo url_for("mp/new") ?>" class="menu_action"><?php echo image_tag("Icons/menu_action/new.png", array("width" => 13,"height" => 13, "alt" => "icon")) ?> Ecrire un nouveau message</a>
</div>
   <div class="nav_barre"></div>
<div align="right">
	<form action="<?php echo url_for("mp/index") ?>" method="post">
    	<select name="choice">
        	<option value="1">Messages reçus</option>
            <option value="0">Messages envoyés</option>
        </select>
        <input name="send" type="submit" value="Afficher" />
    </form>
</div>
    <ul class="titre_elem">	
    	<li class="inline" style="width:50px">
        	
        </li>
 		 <li class="inline" style="width:350px">
            Objet
        </li>	
        <li class="inline" style="width:120px">
            Auteur
        </li>
        <li class="inline" style="width:120px">
            Date
        </li>
        
  </ul>
  <div id="no_res"></div>
  <form action="<?php echo url_for("mp/actions") ?>" method="post">
    <?php foreach($mps as $mp):?>
    <ul class="elem_on_section <?php if($mp["lu"] == "1" || $mp["id_auteur"] == $sf_user->getGuardUser()->getId()) echo "read"; else echo "unread";?>">	
    	<li class="inline" style="width:50px">
        	<input name="mess[]" type="checkbox" value="<?php echo $mp["idmp"] ?>" />
        </li><a class="list_elem" href="<?php echo url_for("mp/show?id=".$mp["idmp"]) ?>">
		<li class="inline" style="width:350px">
            <?php echo $mp["sujet"] ?>
        </li></a>	
        <li class="inline" style="width:120px">
            <a class="list_elem" href="<?php echo url_for("compte/show?id=".$mp["SfGuardUserProfile"]["user_id"]) ?>"><?php echo $mp["SfGuardUserProfile"]["User"]["username"] ?></a>
        </li>
        <li class="inline" style="width:120px">
            <?php echo date("d-m-Y h:i",strtotime($mp["date"],time())) ?>
        </li>
    </ul>
   	 
    <?php endforeach;?>
<div id="no_res"></div>
    <label>Pour la séléction: 
    	  <select name="actionToDO">
    	    <option>--Choisir--</option>
    	    <option value="suppr">Supprimer les messages</option>
    	    <option value="read">Marquer comme lu</option>
    	    <option value="unread">Marquer comme non lu</option>
    	    <option value="spam">Signaler comme spam</option>
  	    </select>
    	  <input type="submit" value="Aller" />
   	  </label>
    </form>


<div class="nav_barre"></div>
 <div style="text-align:right;margin:10px;">
    <a href="<?php echo url_for("mp/new") ?>" class="menu_action"><?php echo image_tag("Icons/menu_action/new.png", array("width" => 13,"height" => 13, "alt" => "icon")) ?> Ecrire un nouveau message</a>
</div>
</div>

<!-- ELSE -->


